package com.paradisecloudtech.vc.system.mvp.model;


import com.paradisecloudtech.vc.system.mvp.manager.ServiceManager;
import com.paradisecloudtech.vc.system.mvp.bean.LoginResultBean;

import io.reactivex.Observable;
import okhttp3.MediaType;
import okhttp3.RequestBody;


public class LoginModel {

    private ServiceManager manager;

    public LoginModel() {
        manager = new ServiceManager();
    }

    public Observable<LoginResultBean> requestLoginData(String name, String password) {
        String json = "{\"userid\":\"" + name + "\",\"password\":\"" + password + "\",\"language\":0}";
        RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), json);
        return manager.requestLoginData(body);
    }


}
